#include <stdio.h>
#define USE_RATIO
#include <tcr.cc>

Point pts[200];
int m, n;

void one_case(int no)
{
	int ii, x, y, bnd, area2;
	Point area;

	scanf("%d", &m);

	pts[0] = mk_point(0,0,1);
	bnd = 0;
	for(ii = 1; ii <= m; ii++)
	{
		scanf("%d %d", &x, &y);
		pts[ii].x = pts[ii-1].x + x;
		pts[ii].y = pts[ii-1].y + y;
		pts[ii].z = 1;

		bnd += ptypegcd(x, y);
	}

	area = poly_area(pts, m);
	area2 = area.z == 2 ? area.x : area.x*2;

	printf("Scenario #%d:\n%d %d %.1f\n\n", no, (area2-bnd+2) / 2, bnd, area2 / 2.0);
}

int main()
{
	int ii;
	scanf("%d", &n);
	
	for(ii = 0; ii < n; ii++)
		one_case(ii+1);

	return 0;
}
